package com.clkj.aimin.dao.notice;

import com.clkj.aimin.pojo.notice.Notice;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

/**
 * @author yawang
 * @create 2024/06/12 09:14:12
 **/
@Repository
public interface NoticeMapper extends Mapper<Notice> {

    @Select(" select  top 1 * from t_cl_notice where notice_flag in (#{userType},-1) and  notice_status = 1 and DateDiff(day,notice_start,getDate()) >=0 order by notice_id desc")
    Notice selectNewNotice(@Param("userType")Integer userType);
}
